package com.hnyc.goods.controller;

import com.hnyc.goods.domain.GoodsLocal;
import com.hnyc.goods.domain.GoodsOnline;
import com.hnyc.goods.service.IGoodsBindService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @auther zero
 * @date 2023/3/11
 **/
@RestController
@RequestMapping("/goods/bind")
public class GoodsBindController extends BaseController {

    @Resource
    IGoodsBindService goodsBindService;
    @GetMapping("/list")
    public TableDataInfo listByOnlineId(GoodsOnline goodsOnline)
    {
        startPage();
        List<GoodsLocal> list = goodsBindService.selectGoodsBindByOnlineId(goodsOnline.getOnlineId());
        return getDataTable(list);
    }
}
